<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>2.2 试用栅格系统完成响应式布局</title>
  <style>
    * {
      box-sizing: border-box;
      padding: 0;
      margin: 0;
    }

    img {
      width: 100%;
    }

    body {
      padding-top: 100px;
    }

    .container {
      background-color: #eee;
    }
  </style>
  <link rel="stylesheet" href="css/grid.css">
  <style>
    .row div {
      border: 1px solid #000;
    }
  </style>
</head>

<body>
  <div class="container">
    <!-- col-  超小屏
         col-sm 小屏
         col-md 中屏
         col-lg 大屏
          就近原则
         col-xl 超大屏
    -->
    <div class="row">
      <div class="col-12 col-sm-6 col-md-3 col-lg-2 col-xl-1">1</div>
      <div class="col-12 col-sm-6 col-md-3 col-lg-2 col-xl-1">2</div>
      <div class="col-12 col-sm-6 col-md-3 col-lg-2 col-xl-1">3</div>
      <div class="col-12 col-sm-6 col-md-3 col-lg-2 col-xl-1">4</div>
      <div class="col-12 col-sm-6 col-md-3 col-lg-2 col-xl-1">5</div>
      <div class="col-12 col-sm-6 col-md-3 col-lg-2 col-xl-1">6</div>
      <div class="col-12 col-sm-6 col-md-3 col-lg-2 col-xl-1">7</div>
      <div class="col-12 col-sm-6 col-md-3 col-lg-2 col-xl-1">8</div>
      <div class="col-12 col-sm-6 col-md-3 col-lg-2 col-xl-1">9</div>
      <div class="col-12 col-sm-6 col-md-3 col-lg-2 col-xl-1">10</div>
      <div class="col-12 col-sm-6 col-md-3 col-lg-2 col-xl-1">11</div>
      <div class="col-12 col-sm-6 col-md-3 col-lg-2 col-xl-1">12</div>
    </div>
    <div style="height: 30px;background-color: bisque;"></div>
    <div class="row">
      <div class="col-md-4">
        <img src="img/2-1.jpg" alt="cellphone">
      </div>
      <div class="col-md-4">
        <img src="img/2-2.jpg" alt="cellphone">
      </div>
      <div class="col-md-4 d-md-none">
        <img src="img/2-3.jpg" alt="cellphone">
      </div>
    </div>

  </div>
</body>

</html>